//
//  ClassMethodsTests.m
//  GeneralDiveUtilitiesTestHarness
//
//  Created by Donald MacKay on 11-04-22.
//  Copyright 2011 President, Northern Tech Diver Corporation. All rights reserved.
//

#import "ClassMethodsTests.h"


@implementation ClassMethodsTests

#if USE_APPLICATION_UNIT_TEST     

#else                           // all code under test must be linked into the Unit Test

- (void)testClassEAD {
    /***
    * Create some GasMix Objects to play with
    */
    
    NSLog(@"************ Running Test Case testClassEAD metric ***************");
    
    double fN2 = 0.68;
    double depth = 30.0;
    
    for (int i = 0 ; i < 4; i++) {
        NSLog(@"The EAD for  %1.2f at %1.0f meters is %1.2ld meters.", fN2, depth, [GasMix EADofGasWithFN2:fN2 atDepthOf:depth isMetric:TRUE]);
        
        fN2 += 0.02;
    }
    
    NSLog(@"************ Running Test Case testClassEAD imperial ***************");    
 
    fN2 = 0.68;
    depth = 100.0;

    for (int i = 0 ; i < 4; i++) {
        NSLog(@"The EAD for  %1.2f at %1.0f feet is %1.2ld feet.", fN2, depth, [GasMix EADofGasWithFN2:fN2 atDepthOf:depth isMetric:TRUE]);
        
        fN2 += 0.02;
    }

}

- (void)testClassEND {
    
    NSLog(@"************ Running Test Case testClassEND metric ***************");
 
    double fHe = 0.35;
    double depth = 45.0;


    fHe = 0.35;
    depth = 45.0;
    for (int i = 0 ; i < 4; i++) {
        NSLog(@"The END of mix containing %1.2f of helium at a depth of %1.0f meters is %1.0ld",
              fHe, depth, [GasMix ENDofGasWithFHe:fHe atDepthOf:depth isMetric:TRUE]);
        fHe += 0.1;
        depth += 15.0;   
    }

    NSLog(@"************ Running Test Case testClassEND Imperial ***************");
    
    fHe = 0.35;
    depth = 150.0;
    
    for (int i = 0 ; i < 4; i++) {
        NSLog(@"The END of mix containing %1.2f of helium at a depth of %1.0f feet is %1.0ld",
              fHe, depth, [GasMix ENDofGasWithFHe:fHe atDepthOf:depth isMetric:FALSE]);
        
        fHe += 0.1;
        depth += 50.0;   
    }
}


#endif

@end
